import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      zh: '首页',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      zh: '关于',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/student-source-map',
      name: 'student-source-map',
      zh: '生源图谱',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/StudentSourceMap.vue'),
    },
    {
      path: '/gender-statistics',
      name: 'gender-statistics', // 这个name必须与您主页面中model_list的value字段完全一致
      zh: '性别统计',
      component: () => import('../views/GenderStatistics.vue')
    },
    {
      path: '/student-overview',
      name: 'student-overview',  // 必须与主页面model_list中的value一致
      zh: '学生统计',
      component: () => import('../views/StudentOverview.vue'),
    },
    {
      path: '/canteen-consumption',
      name: 'canteen-consumption',
      zh: '餐厅消费统计',
      component: () => import('../views/CanteenConsumption.vue')
    },
    {
      path: '/study-score-map',
      name: 'study-score-map',
      zh: '学霸指数',
      component: () => import('../views/StudyScoreMap.vue')
    },
    {
      path: '/enrollment-info',
      name: 'enrollment-info',
      zh: '招生信息',
      component: () => import('../views/EnrollmentInfo.vue')
    },
    {
      path: '/employment-statistics',
      name: 'employment-statistics',
      zh: '就业统计',
      component: () => import('../views/EmploymentStats.vue')
    },
    // {
    //   path: '/test',
    //   name: 'test',
    //   zh: '测试',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/TestView.vue'),
    // },
  ],
})

export default router
